Flattens a 2D array into a new collection. The items are copied row by row.
Example usage:
char[][] array = ['ab'.chars, 'cd'.chars] assert array.flatten() == ['a', 'b', 'c', 'd']
A transpose method for 2D char arrays.
Example usage:
char[][] chars = [['a', 'b'], ['A', 'B']] char[][] expected = [['a', 'A'], ['b', 'B']] def result = chars.transpose() assert result == expected assert chars.class.componentType == result.class.componentType